package com.apes.scm.account.account.repository;

import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.account.account.model.Cooperation;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author xul
 * @create 2018-01-23 16:07
 */
public interface CooperationRepository extends CustomRepository<Cooperation, String> {
    @Query("SELECT T FROM Cooperation T WHERE 1 = 1 AND T.id LIKE %:id%")
    Page<Cooperation> find(@Param("id") String id, Pageable pageable);

    Cooperation findByInventoryModeAndAccountingMethod(String inventoryMode , String accountingMethod);
}
